package silo.dungeonbuddy;

import java.awt.Color;
import java.awt.Graphics2D;

public class RadioButton
{
	private boolean selected;
	private int x;
	private int y;
	private String label;
	
	public RadioButton(int eX, int eY, boolean eSelected, String eLabel)
	{
		x=eX;
		y=eY;
		selected=eSelected;
		label=eLabel;
	}//constructor
	
	public void draw(Graphics2D g)
	{
		g.setColor(Color.white);
		g.fillOval(x, y, 12, 12);
		g.setColor(Color.black);
		if(selected)
		{
			g.fillOval(x+3, y+3, 5, 5);
		}
		g.drawString(label,x-5-g.getFontMetrics().stringWidth(label),y);
	}//draw
	
	//GETTERS
	public boolean getSelected()
	{
		return selected;
	}
	public int getX()
	{
		return x;
	}
	public int getY()
	{
		return y;
	}
	public String getLabel()
	{
		return label;
	}
	
	//SETTERS
	public void setSelected(boolean eSelected)
	{
		selected = eSelected;
	}
	public void setX(int eX)
	{
		x=eX;
	}
	public void setY(int eY)
	{
		y=eY;
	}
	public void setLabel(String eLabel)
	{
		label=eLabel;
	}
}
